#pragma once

#include <QGraphicsView>

class CustomGraphicsView  : public QGraphicsView
{
	Q_OBJECT

public:
	CustomGraphicsView(QWidget *parent);
	~CustomGraphicsView();
	void setPixmap(const QPixmap& pixmap);

signals:
	void sigMouseInImage(QPointF pointF);

private:
	void wheelEvent(QWheelEvent* event);

	void mousePressEvent(QMouseEvent* event);
	void mouseMoveEvent(QMouseEvent* event);
	void mouseReleaseEvent(QMouseEvent* event);

	QGraphicsScene* scene;
	QGraphicsPixmapItem* item;
	bool isDragging;
	QPoint lastPos;
};
